package com.jltx.xq.coroutinesandrxpro

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View

class MainActivity : AppCompatActivity(), View.OnClickListener {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
    }

    override fun onClick(v: View?) {
        when (v?.id) {
            R.id.learn1 ->
                startActivity(Intent(this, MainActivity1::class.java))
            R.id.learn2 ->
                startActivity(Intent(this, MainActivity2::class.java))
            R.id.learn3 ->
                startActivity(Intent(this, MainActivity3::class.java))
            R.id.learn4 ->
                startActivity(Intent(this, MainActivity4::class.java))
            R.id.learn5 ->
                startActivity(Intent(this, MainActivity5::class.java))
        }
    }
}